package com.centit.framework.ip.allmodule.po;

import java.util.Date;
import java.sql.Timestamp;
import javax.persistence.Column;


import javax.persistence.Id;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;


/**
 * create by scaffold 2018-07-08 
 * @author codefan@sina.com
 
  功能信息表功能信息表   
*/
@Entity
@Table(name = "T_MODELS")
public class Models implements java.io.Serializable {
	private static final long serialVersionUID =  1L;



	/**
	 * 信息主键 信息主键 
	 */
	@Id
	@Column(name = "rec_id")

	private String recId;

	/**
	 * 模块编码 模块编码 
	 */
	@Column(name = "modelCode")
	@NotBlank(message = "字段不能为空")
	@Length(min = 0, max = 50, message = "字段长度不能小于{min}大于{max}")
	private String  modelcode;
	/**
	 * 模块名称 模块名称 
	 */
	@Column(name = "modelName")
	@NotBlank(message = "字段不能为空")
	@Length(min = 0, max = 200, message = "字段长度不能小于{min}大于{max}")
	private String  modelname;
	/**
	 * 模块样式 null 
	 */
	@Column(name = "modelClass")
	@Length(min = 0, max = 200, message = "字段长度不能小于{min}大于{max}")
	private String  modelclass;
	/**
	 * 模块图片路径 null 
	 */
	@Column(name = "modelImgUrl")
	@Length(min = 0, max = 200, message = "字段长度不能小于{min}大于{max}")
	private String  modelimgurl;
	/**
	 * 模块排序 模块排序 
	 */
	@Column(name = "orderNo")
	@Length(min = 0, max = 8, message = "字段长度不能小于{min}大于{max}")
	private String  orderno;
	/**
	 * 数据有效标志 [DATA_VALID_FLAG] 数据有效标志 [DATA_VALID_FLAG] 0无效，1有效 
	 */
	@Column(name = "DATA_VALID_FLAG")
	@Length(min = 0, max = 8, message = "字段长度不能小于{min}大于{max}")
	private String  dataValidFlag;
	/**
	 * 数据新增人 [INS_USER_ID] 数据新增人 [INS_USER_ID] 
	 */
	@Column(name = "INS_USER_ID")
	@Length(min = 0, max = 50, message = "字段长度不能小于{min}大于{max}")
	private String  insUserId;
	/**
	 * 数据新增时间 [INS_TIME] 数据新增时间 [INS_TIME] 
	 */
	@Column(name = "INS_TIME")
	private Date  insTime;
	/**
	 * 数据更新人 [UPD_USER_ID] 数据更新人 [UPD_USER_ID] 
	 */
	@Column(name = "UPD_USER_ID")
	@Length(min = 0, max = 50, message = "字段长度不能小于{min}大于{max}")
	private String  updUserId;
	/**
	 * 数据更新时间 [UPD_TIME] 数据更新时间 [UPD_TIME] 
	 */
	@Column(name = "UPD_TIME")
	private Date  updTime;
	/**
	 * 数据删除人 [DEL_USER_ID] 数据删除人 [DEL_USER_ID] 
	 */
	@Column(name = "DEL_USER_ID")
	@Length(min = 0, max = 50, message = "字段长度不能小于{min}大于{max}")
	private String  delUserId;
	/**
	 * 数据删除时间 [DEL_TIME] 数据删除时间 [DEL_TIME] 
	 */
	@Column(name = "DEL_TIME")
	private Date  delTime;

	// Constructors
	/** default constructor */
	public Models() {
	}
	/** minimal constructor */
	public Models(
		String recId		
		,String  modelcode,String  modelname) {
	
	
		this.recId = recId;		
	
		this.modelcode= modelcode; 
		this.modelname= modelname; 		
	}

/** full constructor */
	public Models(
	 String recId		
	,String  modelcode,String  modelname,String  modelclass,String  modelimgurl,String  orderno,String  dataValidFlag,String  insUserId,Date  insTime,String  updUserId,Date  updTime,String  delUserId,Date  delTime) {
	
	
		this.recId = recId;		
	
		this.modelcode= modelcode;
		this.modelname= modelname;
		this.modelclass= modelclass;
		this.modelimgurl= modelimgurl;
		this.orderno= orderno;
		this.dataValidFlag= dataValidFlag;
		this.insUserId= insUserId;
		this.insTime= insTime;
		this.updUserId= updUserId;
		this.updTime= updTime;
		this.delUserId= delUserId;
		this.delTime= delTime;		
	}
	

  
	public String getRecId() {
		return this.recId;
	}

	public void setRecId(String recId) {
		this.recId = recId;
	}
	// Property accessors
  
	public String getModelcode() {
		return this.modelcode;
	}
	
	public void setModelcode(String modelcode) {
		this.modelcode = modelcode;
	}
  
	public String getModelname() {
		return this.modelname;
	}
	
	public void setModelname(String modelname) {
		this.modelname = modelname;
	}
  
	public String getModelclass() {
		return this.modelclass;
	}
	
	public void setModelclass(String modelclass) {
		this.modelclass = modelclass;
	}
  
	public String getModelimgurl() {
		return this.modelimgurl;
	}
	
	public void setModelimgurl(String modelimgurl) {
		this.modelimgurl = modelimgurl;
	}
  
	public String getOrderno() {
		return this.orderno;
	}
	
	public void setOrderno(String orderno) {
		this.orderno = orderno;
	}
  
	public String getDataValidFlag() {
		return this.dataValidFlag;
	}
	
	public void setDataValidFlag(String dataValidFlag) {
		this.dataValidFlag = dataValidFlag;
	}
  
	public String getInsUserId() {
		return this.insUserId;
	}
	
	public void setInsUserId(String insUserId) {
		this.insUserId = insUserId;
	}
  
	public Date getInsTime() {
		return this.insTime;
	}
	
	public void setInsTime(Date insTime) {
		this.insTime = insTime;
	}
  
	public String getUpdUserId() {
		return this.updUserId;
	}
	
	public void setUpdUserId(String updUserId) {
		this.updUserId = updUserId;
	}
  
	public Date getUpdTime() {
		return this.updTime;
	}
	
	public void setUpdTime(Date updTime) {
		this.updTime = updTime;
	}
  
	public String getDelUserId() {
		return this.delUserId;
	}
	
	public void setDelUserId(String delUserId) {
		this.delUserId = delUserId;
	}
  
	public Date getDelTime() {
		return this.delTime;
	}
	
	public void setDelTime(Date delTime) {
		this.delTime = delTime;
	}



	public Models copy(Models other){
  
		this.setRecId(other.getRecId());
  
		this.modelcode= other.getModelcode();  
		this.modelname= other.getModelname();  
		this.modelclass= other.getModelclass();  
		this.modelimgurl= other.getModelimgurl();  
		this.orderno= other.getOrderno();  
		this.dataValidFlag= other.getDataValidFlag();  
		this.insUserId= other.getInsUserId();  
		this.insTime= other.getInsTime();  
		this.updUserId= other.getUpdUserId();  
		this.updTime= other.getUpdTime();  
		this.delUserId= other.getDelUserId();  
		this.delTime= other.getDelTime();

		return this;
	}
	
	public Models copyNotNullProperty(Models other){
  
	if( other.getRecId() != null)
		this.setRecId(other.getRecId());
  
		if( other.getModelcode() != null)
			this.modelcode= other.getModelcode();  
		if( other.getModelname() != null)
			this.modelname= other.getModelname();  
		if( other.getModelclass() != null)
			this.modelclass= other.getModelclass();  
		if( other.getModelimgurl() != null)
			this.modelimgurl= other.getModelimgurl();  
		if( other.getOrderno() != null)
			this.orderno= other.getOrderno();  
		if( other.getDataValidFlag() != null)
			this.dataValidFlag= other.getDataValidFlag();  
		if( other.getInsUserId() != null)
			this.insUserId= other.getInsUserId();  
		if( other.getInsTime() != null)
			this.insTime= other.getInsTime();  
		if( other.getUpdUserId() != null)
			this.updUserId= other.getUpdUserId();  
		if( other.getUpdTime() != null)
			this.updTime= other.getUpdTime();  
		if( other.getDelUserId() != null)
			this.delUserId= other.getDelUserId();  
		if( other.getDelTime() != null)
			this.delTime= other.getDelTime();		

		return this;
	}

	public Models clearProperties(){
  
		this.modelcode= null;  
		this.modelname= null;  
		this.modelclass= null;  
		this.modelimgurl= null;  
		this.orderno= null;  
		this.dataValidFlag= null;  
		this.insUserId= null;  
		this.insTime= null;  
		this.updUserId= null;  
		this.updTime= null;  
		this.delUserId= null;  
		this.delTime= null;

		return this;
	}
}
